
import yaml


class yaml_r:

    def readyaml(self):
        with open('config.yaml', 'r') as file:
            data = yaml.safe_load(file)
            return data


if __name__ == '__main__':
    m = yaml_r()
    print(m.readyaml()['db_config']["host"])
